package com.cnplan.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.cnplan.entity.ArcFile;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ArcFileMapper extends BaseMapper<ArcFile> {

    @Select(value = "select * from arc_file where arc_num= #{arcNum} ${fileName}")
    List<ArcFile> getArcFile(@Param("arcNum") String arcNum,@Param("fileName") String fileName);

    @Select(value = "select * from arc_file where arc_num= #{arcNum} and file_num= #{fileNum} limit 1")
    ArcFile findByFileNum(@Param("arcNum") String arcNum,@Param("fileNum") Integer fileNum);

    @Select(value = "select * from arc_file where arc_num= #{arcNum} limit 1")
    ArcFile findByarcNum(@Param("arcNum") String arcNum);
}
